package visualizer.client.widgets.algoPanel;

import com.google.gwt.user.client.ui.Widget;
import visualizer.client.event.AlgorithmChangeHandler;

/**
 * User: DDovzhenko
 * Date: 30.12.13
 * Time: 14:10
 */
public class AlgorithmPanelPresenter {
    private Display view;

    public AlgorithmPanelPresenter(Display view) {
        this.view = view;
    }

    public Widget getWidget() {
        return view.asWidget();
    }

    public void setChangeAlgorithmListener(AlgorithmChangeHandler listener) {
        view.setChangeAlgorithmListener(listener);
    }

    public void onResize() {
        view.onResize();
    }

    interface Display {
        Widget asWidget();
        void setChangeAlgorithmListener(AlgorithmChangeHandler eventListener);
        void onResize();
    }
}
